package com.ntschy.bt.entity.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonFormat;


/**
 *
 * @author lxr
 *
 * 公司分类
 */

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BtHelpCompanyTypeEnum implements IEnum<Integer> {
    /**
     * 公司分类   1.规上企业   2.骨干企业  3.百强企业
     */
    SPECIFICATION(1, "规上企业"),
    BACKBONE(2,"骨干企业"),
    HUNDRED(3, "百强企业");



    //    @JsonValue
    private final int value;

    //    @JsonValue
    private final String desc;

    BtHelpCompanyTypeEnum(int value,String desc){
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return desc;
    }

    @JsonCreator
    public static BtHelpCompanyTypeEnum BtHelpBackFromValue(int value){
        for (BtHelpCompanyTypeEnum examineResult : BtHelpCompanyTypeEnum.values()){
            if(examineResult.getValue() == value){
                return examineResult;
            }
        }

        return  null;
    }


}
